package com.xujie.sportsmeeting.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.EqualsAndHashCode;

import jakarta.validation.constraints.NotNull;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 报名信息实体
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("event_registration")
public class Registration implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 报名ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 项目ID
     */
    @NotNull(message = "项目ID不能为空")
    @TableField("event_id")
    private Long eventId;

    /**
     * 运动员ID
     */
    @NotNull(message = "运动员ID不能为空")
    @TableField("athlete_id")
    private Long athleteId;

    /**
     * 报名编号
     */
    @TableField("registration_number")
    private String registrationNumber;

    /**
     * 团队名称(团体项目)
     */
    @TableField("team_name")
    private String teamName;

    /**
     * 报名时间
     */
    @TableField("registration_time")
    private LocalDateTime registrationTime;

    /**
     * 审核状态 0-待审核 1-审核通过 2-审核拒绝
     */
    @TableField("audit_status")
    private Integer auditStatus;

    /**
     * 审核时间
     */
    @TableField("audit_time")
    private LocalDateTime auditTime;

    /**
     * 审核人ID
     */
    @TableField("audit_user_id")
    private Long auditUserId;

    /**
     * 审核备注
     */
    @TableField("audit_remark")
    private String auditRemark;

    /**
     * 参赛号码
     */
    @TableField("race_number")
    private String raceNumber;

    /**
     * 报名备注
     */
    @TableField("remarks")
    private String remarks;

    /**
     * 状态 0-取消 1-正常
     */
    @TableField("status")
    private Integer status;

    /**
     * 创建时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;
}